package com.itheima.pattern.t14_command.demo2;

public class TurnOffThread implements Runnable {

    // 持有接受者角色
    private Receiver receiver;

    public TurnOffThread(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void run() {
        receiver.turnOFF();
    }
}
